﻿Imports Transcriber.Api

''' <summary>
''' Edit mode file dialog.
''' </summary>
Public Class frmEditMode

    Inherits Form

    Private mModeName As String
    Private mTranscriber As ITranscriberApplication

    ''' <summary>
    ''' Initializes a new instance of the <see cref="frmEditMode" /> class.
    ''' </summary>
    ''' <param name="modeName">
    ''' Name of the mode to edit, or Nothing to create a new mode file.
    ''' </param>
    ''' <param name="Transcriber">
    ''' The <see cref="ITranscriberApplication"/> instance.
    ''' </param>
    Public Sub New(ByVal ModeName As String, ByVal Transcriber As ITranscriberApplication)

        Me.InitializeComponent()
        Me.mModeName = ModeName
        Me.mTranscriber = Transcriber

    End Sub

    ''' <summary>
    ''' Handles the Load event of the frmEditMode control.
    ''' </summary>
    ''' <param name="sender">The source of the event.</param>
    ''' <param name="e">The <see cref="System.EventArgs" /> instance containing the event data.</param>
    Private Sub frmEditMode_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If IsNothing(Me.mModeName) Then
            Me.Text = "New Mode"
        Else
            Me.Text = "Edit " + Me.mModeName + " Mode"
        End If

    End Sub

End Class